package com.example.springbootshiro.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springbootshiro.pojo.Perms;
import com.example.springbootshiro.mapper.PermsMapper;
import com.example.springbootshiro.service.IPermsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gqz
 * @since 2021-09-03
 */
@Service
public class PermsServiceImpl extends ServiceImpl<PermsMapper, Perms> implements IPermsService {

    @Autowired
    private PermsMapper permsMapper;

    @Override
    public Perms findPermsById(Long id) {
        return permsMapper.selectById(id);
    }

    @Override
    public List<Perms> findAll() {
        return permsMapper.selectList(new QueryWrapper<>());
    }
}
